<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Main extends Admin_Controller
{
	public function __construct()
	{
		parent::__construct();	
	}
	
	public function index()
	{
		$this->load->view( $this->layout );	
	}
	
	public function restricted()
	{
		$this->load->view( $this->layout_restricted );	
	}
	
	public function settings_access()
	{
		$this->load->helper('menu');
		$menu = array_menu(0,2);
		$this->output->set_content_type('application/json')->set_output(json_encode($menu));	
	}
	
	public function access()
	{
		$this->load->helper('menu');
		$menu = array_menu(0,1);
		$this->output->set_content_type('application/json')->set_output(json_encode($menu));
	}
	
	public function all_access()
	{
		$this->load->helper('menu');
		$menu = array_menu(0,'all');
		$this->output->set_content_type('application/json')->set_output(json_encode($menu));
	}
}